﻿@{
    Layout = "_LayoutalertForm";
    ViewData["title"] = "导出Excel";
}
<div class="page-content laoutgundon">
    <div class="add_userinfo" style="text-align:center;margin-top:20px;">
        <img src="~/Images/loader10.gif" /> Excel导出中，请稍候
    </div>
</div>
@section scripts{
    <script type="text/javascript">
        $(function () {
            setInterval(FileExists, 3000);
        })
        function FileExists()
        {
            $.ajax({
                url: '/ExportExcel/FileExists',
                type: 'post',
                data: { File: '@ViewBag.File' },
                cache: false,
                async: false,
                success: function (r) {
                 //   console.log(r.exists);
                    if (r.exists == true)  //成功
                    {
                        var index = parent.layer.getFrameIndex(window.name);
                        parent.layer.close(index);
                    }
                }
            });
        }
    </script>
}